﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Windows.Media.Imaging;

namespace devtm.AutoMapper
{

    public class ContainerHeader : IContainerHeader
    {

        public ContainerHeader()
        {

            //if (inherited)
            //    _inherited = System.Windows.Visibility.Visible;
            //else
            //    _inherited = System.Windows.Visibility.Hidden;


        }

        public event PropertyChangedEventHandler PropertyChanged;

        private string _Label;


        public string Label
        {
            get { return _Label; }
            set
            {
                if (_Label == value)
                    return;

                _Label = value;

                if (PropertyChanged != null)
                    PropertyChanged(this, new PropertyChangedEventArgs("Label"));
            }
        }


       
        public byte[] ImageSource
        {
            
            set
            {
                                
                _image = ImageHelper.GetBitmapImage(value);

                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("ImageSource"));
                    PropertyChanged(this, new PropertyChangedEventArgs("Image"));
                }
            }
        }


        private BitmapImage _image;
        public BitmapImage Image
        {
            get { return _image; }
        }


    }

}
